import java.util.Scanner;

public class Solution {
    public static boolean isPalindrome(int x) {
        if(x < 0) {
            return false;
        } else{
            int tem = x;
            int y = 0;
            while(tem != 0) {
                y = y * 10 + tem % 10;
                tem /= 10;
            }
            if(y == x) {
                return true;
            } else {
                return false;
            }
        }
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int x = scan.nextInt();
        boolean num = isPalindrome(x);
        System.out.println(num);
    }
}